﻿using System;

public class Mapper003 : MapperDefault
{
    public override void init(NES nes)
    {
        base.init(nes);
    }

    public override void write(int address, short value_Renamed)
    {
        if (address < 0x8000)
        {
            base.write(address, value_Renamed);
        }
        else
        {
            int bank = (value_Renamed % (base.nes.Rom.VromBankCount / 2)) * 2;
            this.loadVromBank(bank, 0);
            this.loadVromBank(bank + 1, 0x1000);
            this.load8kVromBank(value_Renamed * 2, 0);
        }
    }
}

